package com.yl.chainStore.mapper.warehouse;

import com.yl.chainStore.entity.warehouse.WarehouseCheckOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.yl.chainStore.common.enums.Status
import com.yl.chainStore.pojo.vo.warehouse.WarehouseCheckOrderSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 盘点单 Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-06-10
 */
@Mapper
interface WarehouseCheckOrderMapper : BaseMapper<WarehouseCheckOrder> {

    /**
     * 分页查询
     */
    fun selectOrderPage(@Param("page") page: Page<WarehouseCheckOrder>,
                        @Param("vo") vo : WarehouseCheckOrderSelectVo
    ):Page<WarehouseCheckOrder>

    /**
     * 获取某个用户某个状态的订单列表
     */
    fun getUserStagingCheckOrder(@Param("userId")userId:Long,
                                    @Param("warehouseId")warehouseId:Long,
                                    @Param("status")status: Status
    ): List<WarehouseCheckOrder>
}
